package com.homelock.common.enumeration;

public enum LockTypeEnum {
    KEYIN_LOCK("科银智能门锁",1,true),
    ZX_LOCK("振兴智能门锁",2,false);
    String typeName;
    int typeValue;
    boolean registerEnable;

    LockTypeEnum(String typeName,int typeValue,boolean registerEnable){
        this.typeName = typeName;
        this.typeValue = typeValue;
        this.registerEnable = registerEnable;
    }

    public int getTypeValue() {
        return typeValue;
    }

    public String getTypeName() {
        return typeName;
    }

    public boolean isRegisterEnable() {
        return registerEnable;
    }

    public static LockTypeEnum valueOf(int value){
        for(LockTypeEnum lockTypeEnum:LockTypeEnum.values()){
            if(lockTypeEnum.typeValue == value){
                return lockTypeEnum;
            }
        }
        return null;
    }
}
